<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    function array(x, y, z) {
      if (x + y < z) {
        return false;
      }
      if (x === 0 || y === 0) {
        return (z === 0) || (x + y === z);
      }
      return (z % gcd(x, y)) === 0;
    };
    function gcd(a, b) {
      if (b === 0) {
        return a;
      }
      return gcd(b, a % b);
    }
    console.log(array(3, 5, 4))
  </script>
</body>

</html>